// 动态路由
import Layout from '@/layout'
export const asyncRoutes = [
  {
    path: '/manage-base-info',
    component: Layout,
    meta: { title: '基础信息管理', icon: 'el-icon-document' },
    children: [
      {
        path: '/storehouse1',
        name: 'storehouse1',
        component: () => import('@/views/Basic/storehouse1'),
        meta: { title: '仓库管理' }

      },
      {
        path: '/add', // 如果children path置空的话 当前这个路由会作为一级渲染的默认路由
        name: 'add',
        component: () => import('@/views/Basic/storehouse1/components/add'),
        hidden: true
      },
      {
        path: '/add2', // 如果children path置空的话 当前这个路由会作为一级渲染的默认路由
        name: 'add2',
        component: () => import('@/views/Basic/reservoir2/components/add'),
        hidden: true
      },
      {
        path: '/add3', // 如果children path置空的话 当前这个路由会作为一级渲染的默认路由
        name: 'add3',
        component: () => import('@/views/Basic/warehouse3/components/add'),
        hidden: true
      },
      {
        path: '/reservoir2', // 如果children path置空的话 当前这个路由会作为一级渲染的默认路由
        name: 'reservoir2',
        component: () => import('@/views/Basic/reservoir2'),
        meta: { title: '库区管理' }
      }, {
        path: '/warehouse3', // 如果children path置空的话 当前这个路由会作为一级渲染的默认路由
        name: 'warehouse3',
        component: () => import('@/views/Basic/warehouse3'),
        meta: { title: '库位管理' }
      }, {
        path: '/warehouse4', // 如果children path置空的话 当前这个路由会作为一级渲染的默认路由
        name: 'warehouse4',
        component: () => import('@/views/Basic/warehouse4'),
        meta: { title: '库位视图' }
      }, {
        path: '/goods', // 如果children path置空的话 当前这个路由会作为一级渲染的默认路由
        name: 'goods',
        component: () => import('@/views/Basic/goods'),
        meta: { title: '货品管理' }
      }, {
        path: '/goodsList', // 如果children path置空的话 当前这个路由会作为一级渲染的默认路由
        name: 'goodsList',
        component: () => import('@/views/Basic/goodsList'),
        meta: { title: '货品类型管理' }
      }
    ]
  },
  {
    path: '/manage-business',
    component: Layout,
    name: 'business',
    meta: { title: '商务管理', icon: 'el-icon-suitcase-1' },
    children: [
      {
        path: '/goods-owner',
        name: 'goods-owner',
        component: () => import('@/views/business/goods-owner'),
        meta: { title: '货主管理' }
      },
      {
        path: '/task-picking',
        name: 'task-picking',
        component: () => import('@/views/business/task-picking'),
        meta: { title: '承运商管理' }
      }
    ]
  },
  {
    path: '/manage-storage',
    component: Layout,
    name: 'storage',
    meta: { title: '库内管理', icon: 'el-icon-receiving' },
    children: [
      {
        path: '/list',
        name: 'list',
        component: () => import('@/views/storage/list'),
        meta: { title: '盘点单' }
      },
      {
        path: '/list-task',
        name: 'list-task',
        component: () => import('@/views/storage/list-task'),
        meta: { title: '盘点任务' }
      },
      {
        path: '/storage-lose-profit',
        name: 'storage-lose-profit',
        component: () => import('@/views/storage/storage-lose-profit'),
        meta: { title: '库存损益' }
      },
      {
        path: '/latest-storage',
        name: 'latest-storage',
        component: () => import('@/views/storage/latest-storage'),
        meta: { title: '库存损益' }
      }
    ]
  },
  {
    path: '/manage-storage-in/list-in',
    component: Layout,
    redirect: '/manage-storage-in/list-in/list',
    name: 'StorageIn',
    meta: { title: '入库管理', icon: 'el-icon-sold-out' },
    children: [
      {
        path: '/list',
        name: 'list',
        component: () => import('@/views/StorageIn/list'),
        meta: { title: '入库单' }
      },
      {
        path: '/task-receive',
        name: 'task-receive',
        component: () => import('@/views/StorageIn/task-receive'),
        meta: { title: '收货任务' }
      },
      {
        path: '/task-add',
        name: 'task-add',
        component: () => import('@/views/StorageIn/task-add'),
        meta: { title: '上架任务' }
      }
    ]
  },
  {
    path: '/manage-storage-out',
    component: Layout,
    redirect: '/manage-storage-out/list-out',
    name: 'StorageOut',
    meta: { title: '出库管理', icon: 'el-icon-sell' },
    children: [
      {
        path: '/list-out',
        name: 'list-out',
        component: () => import('@/views/StorageOut/list-out'),
        meta: { title: '出库单' }
      },
      {
        path: '/task-picking',
        name: 'task-picking',
        component: () => import('@/views/StorageOut/task-picking'),
        meta: { title: '拣货任务' }
      },
      {
        path: '/manage-task-transfer',
        name: 'manage-task-transfer',
        component: () => import('@/views/StorageOut/manage-task-transfer'),
        meta: { title: '交接任务' }
      }
    ]
  }
]
